<!DOCTYPE html>
<html lang="en">
 

<head>
     
    <meta charset="UTF-8">
     
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>exercise1</title>
</head>


<body>
     
    <script>
        var s = [3, 6, 81, 4, 0, 7];
        for (var i = 0; i < 5; i++) {
            for (var j = 0; j < 5 - i; j++) {
                if (a[j] > s[j + 1]) {
                    {
                        var t;
                        t = s[j];
                        s[j] = s[j + 1];
                        s[j + 1] = t;
                    }
                }
            }
        }
        for (var i = 0; i < s.length; i++) {
            document.write(s[i] + "&nbsp");
        }


    </script>
</body>

</html>